<%-------------------------------------------------------------------
 * 页面名称：bankPayRequest.jsp
 * 功能描述：网上银行充值－银行接口跳转页面
 * Action  : 
 *
 *-------------------------------------------------------------------
--%>

<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="struts-html.tld" prefix="html"%>
<%@ taglib uri="struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="struts-logic.tld" prefix="logic"%>
<%@ taglib uri="struts-bean.tld" prefix="bean"%>
<%
String path = request.getContextPath();
%>

<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				网上银行支付请求
			</div>
			<div class="edit_pass">
				<table width="100%" border="0" align="center" cellpadding="7"
					cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
					<tr>
						<td bgcolor="#FFFFFF">
							<table width="100%" border="0" cellpadding="0" cellspacing="5">
								<logic:present name="bankPayRequest">
									<logic:equal name="bankPayRequest" property="valid"
										value="true">
										<form name="BankPayRequestForm" id="BankPayRequestForm"
											method="<bean:write name="bankPayRequest" property="submitMethod" />"
											action="<bean:write name="bankPayRequest" property="bankUrl" />">
											<logic:present name="bankPayRequest" property="parameters">
												<logic:iterate id="parameter" name="bankPayRequest"
													property="parameters">
													<input type="hidden"
														name="<bean:write name="parameter" property="key" />"
														value="<bean:write name="parameter" property="value"/>" />
												</logic:iterate>
											</logic:present>
										</form>
										<tr>
											<td width="4%" valign="top">
											<table width="100%" border="0" align="center" cellpadding="3"
										cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
										<tr>
											<td bgcolor="#fffdf5">
												<table width="100%" border="0" cellpadding="3"
													cellspacing="0">
													<tr>
														<td width="3%" height="25" valign="top"
															style="border-bottom:1px solid #ccc;"></td>
														<td width="97%" align="left" class="red12b"
															style="border-bottom:1px solid #ccc;">
															特别提醒
														</td>
													</tr>
													<tr>
														<td valign="top">
															&nbsp;
														</td>
														<td align="left" class="font_gray">
															<img src="<%=path%>/images/arrow2.gif" width="16"
																height="16" align="absmiddle" />
															页面将自动跳转到网银页面，若页面长时间没响应，请点击下方的按钮
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</logic:equal>
									<logic:equal name="bankPayRequest" property="valid"
										value="false">
										<tr>
											<td width="4%" valign="top">
												<table width="100%" border="0" cellpadding="3"
													cellspacing="0">
													<tr>
														<td width="25%" align="right" valign="top">
															<a href="#"><img
																	src="<%=path%>/images/failure_icon.gif" width="60"
																	height="56" border="0" align="absmiddle" /> </a>
														</td>
														<td width="75%" align="left" class="orang16b">
															请求参数无效，无法提交，请联系系统管理员!
														</td>
													</tr>
												</table>
										</tr>
									</logic:equal>
								</logic:present>
								<logic:notPresent name="bankPayRequest">
									<tr>
										<td>
											<table width="100%" border="0" cellpadding="3"
												cellspacing="0">
												<tr>
													<td width="25%" align="right" valign="top">
														<img src="<%=path%>/images/failure_icon.gif" width="60"
															height="56" border="0" align="absmiddle" />
													</td>
													<td width="75%" align="left" class="orang16b">
														<logic:present name="org.apache.struts.action.ERROR">
															<html:errors />
														</logic:present>
														<logic:notPresent name="org.apache.struts.action.ERROR">系统出现不可预知的错误，可能是后台无法与您所选择的银行建立连接，请稍后重新尝试</logic:notPresent>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</logic:notPresent>
							</table>
						</td>
					</tr>
				</table>
				<table width="100%" border="0" align="center" cellpadding="5"
					cellspacing="1">
					<tr>
						<td height="55" align="center">
							<logic:present name="bankPayRequest">
								<logic:equal name="bankPayRequest" property="valid" value="true">
									<input type="button" value="去银行付款" class="button_style"
										style="margin-right:20px;" onclick="toSubmit();" />
								</logic:equal>
								<logic:equal name="bankPayRequest" property="valid"
									value="false">
									<input type="button" value="关闭" class="button_style"
										style="margin-right:20px;" onclick="self.close();" />
								</logic:equal>
							</logic:present>
							<logic:notPresent name="bankPayRequest">
								<input type="button" value="关闭" class="button_style"
									style="margin-right:20px;" onclick="self.close();" />
							</logic:notPresent>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<script language="javascript">
function toSubmit(){
  var formObj = document.forms["BankPayRequestForm"];
  if(formObj!=undefined && formObj.action!=""){
      formObj.submit();
  }
}
toSubmit();
</script>
